package yagwl.service.fnd.flex;

import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;

/**
 * dependency injection built in to inject resource bundle (properties) file
 */
public class ConfigService {
  private static final ConfigService svc = new ConfigService();
  private ResourceBundle rb = PropertyResourceBundle
      .getBundle("yagwl.service.fnd.flex.Config");

  private ConfigService() {
  }

  public static ConfigService getInstance() {
    return svc;
  }
  
  public void setConfigFile(String configFile) {
    rb = PropertyResourceBundle.getBundle(configFile);
  }
  
  public String getValue(String key) {
    return rb.getString(key);
  }

  public String getSessionCookieName() {
    return getValue("SessionCookieName");
  }
}
